﻿using System;
using System.ComponentModel.DataAnnotations;

namespace Manager.Model.Admin
{
    /// <summary>
    /// M_News:实体类(属性说明自动提取数据库字段的描述信息)
    /// </summary>
    [Serializable]
    public partial class M_News
    {
        public M_News()
        { }
        #region Model
        private int _newsid;
        private string _newstitle;
        private string _newscontent;
        private string _newsauther;
        private string _newssource;
        private int? _newstypeid;
        private DateTime? _newsdate = DateTime.Now;
        private bool _isvalid = true;
        private bool _istop = true;
        private string _newsimage;
        /// <summary>
        /// 
        /// </summary>
        [Display(Name="新闻编号")]
        public int NewsID
        {
            set { _newsid = value; }
            get { return _newsid; }
        }
        /// <summary>
        /// 
        /// </summary>
        [Display(Name="新闻标题")]
        [StringLength(50)]
        [Required]
        public string NewsTitle
        {
            set { _newstitle = value; }
            get { return _newstitle; }
        }
        /// <summary>
        /// 
        /// </summary>
        [Display(Name="新闻内容")]
        public string NewsContent
        {
            set { _newscontent = value; }
            get { return _newscontent; }
        }
        /// <summary>
        /// 
        /// </summary>
        [Display(Name="新闻作者")]
        [StringLength(20)]
        public string NewsAuther
        {
            set { _newsauther = value; }
            get { return _newsauther; }
        }
        /// <summary>
        /// 
        /// </summary>
        [Display(Name="新闻来源")]
        [StringLength(50)]
        public string NewsSource
        {
            set { _newssource = value; }
            get { return _newssource; }
        }
        /// <summary>
        /// 
        /// </summary>
        [Display(Name="新闻类别")]
        [Required]
        public int? NewsTypeID
        {
            set { _newstypeid = value; }
            get { return _newstypeid; }
        }
        /// <summary>
        /// 
        /// </summary>
        [Display(Name="发布时间")]
        public DateTime? NewsDate
        {
            set { _newsdate = value; }
            get { return _newsdate; }
        }
        /// <summary>
        /// 
        /// </summary>
        [Display(Name="是否有效")]
        public bool IsValid
        {
            set { _isvalid = value; }
            get { return _isvalid; }
        }
        /// <summary>
        /// 
        /// </summary>
        [Display(Name="首页显示")]
        public bool IsTop
        {
            set { _istop = value; }
            get { return _istop; }
        }

        /// <summary>
        /// 
        /// </summary>
        [Display(Name = "新闻图片")]
        public string NewsImage
        {
            set { _newsimage = value; }
            get { return _newsimage; }
        }
        #endregion Model

    }
}

